// 机构js
var $scope = null;
$(function() {
	var appElement = document.querySelector('[ng-controller=main]');
	$scope = angular.element(appElement).scope();
	  initialPage($scope);
	  //消息动态列表
	$scope.methods.orgList();
});
// 初始化值
function initialPage($scope) {
	
	
}
var mainApp = angular.module("mainApp", []);
mainApp.controller('main', function($scope) {
	$scope.search={};
	$scope.methods = {
		//机构列表
		orgList : function() {
			var params = '';
			params += '&pageNum=1'
			params += '&pageSize=30'
			params += '&status=1'
			$.ajax({
			    url:$.shysUrlPrefix+'/website/orgList?'+params,
			    type:'get',
			    dataType:'JSON',
				async:true,  //同步方式发起请求
			    success:function (data) {
					console.log(data)
					if (data.rows != null && data.rows.length > 0 ) {
					  $scope.orgList = data.rows;
					   $scope.$apply();
					} else {
					   
					}
					
			    },
			
			})
		},
	};
});











